#include "frmmain.h"
#include <QApplication>
#include "quihelper.h"
#include "appinit.h"
#include "connection.h"
#include "settinghelper.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    AppInit::Instance()->starts();

    QUIHelper::setFont();
    QUIHelper::setCode();

    //加载配置文件
    SettingHelper::initSetting();

    if(!createConnection())
    {
        QUIHelper::showMessageBox(QString("数据库打开失败"));
    }

    frmMain w;
    w.show();

    return a.exec();
}
